import type { LifeModel } from "../model/lifeModel";
import * as PathUtils from "../utils/pathUtils";
import { defineStore } from "pinia";

const UseLifeModel = defineStore("lifeModel", {
  state() {
    return {
      lifeModel: PathUtils.lifeModelInit,
    };
  },
  actions: {
    setLifeModel: function (lifeModel: LifeModel) {
      // console.log("surfaceSetting", surfaceSetting);
      // console.log('surfaceSetting',...surfaceSetting)
      this.getLifeModel().setInfo(lifeModel);
      // this.surfaceSetting.setInfo(...surfaceSetting);
      // this.setting = setting;
    },
    getLifeModel: function (): LifeModel {
      return this.lifeModel;
    },
  },
  getters: {},
});
export default UseLifeModel;
